home *** CD-ROM | disk | FTP | other *** search
/ Acorn User: China / Acorn User China CD-ROM (UK) (Disc A) / Acorn User China CD-ROM (UK) (Disc A).bin / ARMCLUB / DRUCK / WINDOW_OPEN.ARC / WindOpenDc < prev   
Encoding:
Text File  |  1998-06-29  |  7.2 KB  |  161 lines

  1.  
  2. Window Open Module
  3. ====== ==== ======
  4.  
  5. © 1991-1998 DEEJ Technology PLC
  6.  
  7. The Window Open module privides commands to control the operation of tasks
  8. and thier windows. The module enables standard working enviroments to be set
  9. up and recreated via an Obey file. Applications can be started windows moved
  10. to the desired postions. Editors can be made to automatically load files,
  11. and options set via an applications menu system.
  12.  
  13. The Window Open module only uses standard legal RISC OS operations.
  14.  
  15. The Window Open Module is implemented as a RISC OS task, and will not be
  16. active if it is RMLoad'ed. If it is RMRun'd at the begining of an Obey file,
  17. any subsequent commands will not be exectuted. To ensure that the WindOpen
  18. moudule is active and to execute commands from the same Obey file, the
  19. following procedure should be followed:-
  20.  
  21.         | Check for presence of WindOpen
  22.         |
  23.         Set WO$start FALSE
  24.         RMEnsure WindOpen 0.00 *Set WO$start TRUE
  25.         |
  26.         | Replace <Path_to_WindOpen> with pathname
  27.         |
  28.         IF "<WO$start>" = "TRUE" THEN *RMLoad <Path_to_WindOpen>.WindOpen
  29.         |
  30.         | ---------------------
  31.         | Rest of Obey file....
  32.         | ---------------------
  33.         |
  34.         | Any Window Open commands will be queued
  35.         | until the task is started
  36.         |
  37.         | Start WindOpen task if just loaded
  38.         |
  39.         IF "<WO$start>" = "TRUE" THEN *Desktop_WindOpen
  40.         |
  41.         | End of file
  42.  
  43.  
  44. WindOpen Version History
  45. ------------------------
  46. 1.00 (27 Dec 1991)  Initial revision
  47. 1.10 (15 Feb 1992)  First release version
  48. 1.20 (27 Jan 1993)  Support for !WorkSpace added
  49. 1.30 (12 Feb 1994)  WO_WorkSpaceModes added, Faster, needs less RMA memory
  50. 1.31 (15 Apr 1994)  Workspace messages changed and registered with Acorn.
  51. 1.40 (19 Jul 1995)  WO_OpenWindow fixed (message has your_ref=0) and doesnot
  52.                     attempt to load the file if a window is already open
  53.                     (move still works if coords are supplied).
  54.                     Wildcard for task and window name added.
  55. 1.50 (02 Jul 1995)  Support for !WorkSpace 3.60 with 6 workspaces.
  56.                     Change to use Wimp Poll Word instead of null events.
  57. 1.60 (31 Oct 1995)  WO_Wait added to indert delays in scripts
  58. 1.70 (08 Feb 1996)  All window names OS_GSTrans to allow <variable> in names.
  59.                     WO_CloseWind doesnot report error if window doesnot exist
  60.                     WO_TypeString now requires quotes around string if it
  61.                     contains spaces. Partial Task/Window names now only match
  62.                     if the end of a match is at a space.
  63. 1.83 (24 Jun 1998)  Canacolise file name in WO_OpenWind to allow "path:filename"                    in WO_OpenWind calls
  64.                     New service entry format for Ursula
  65.                           
  66.  
  67. !WorkSpace is also available from DEEJ Technology PLC
  68.  
  69.  
  70. Commands provided:
  71. Desktop_WindOpen
  72. WO_EnsureTask
  73. WO_RemoveTask
  74. WO_OpenWind
  75. WO_MoveWind
  76. WO_CloseWind
  77. WO_MenuSelect
  78. WO_TypeString
  79. WO_ProcessKey
  80. WO_IconBarClick
  81. WO_WindowDump
  82. WO_WorkSpace
  83. WO_WindWorks
  84. WO_WorkSpaceModes
  85.  
  86. It has help on:
  87. WindOpen
  88.  
  89. ==> Help on keyword WindOpen
  90. Provides *commands to control windows and tasks which can issued from Obey
  91. files.
  92.  
  93. In all cammands <taskname> is the name of a task as shown in the Task Manager
  94. display, <window name> is the full or partial name of a window, case is
  95. ignored when matching, names contaning spaces should be given in quotes. A
  96. wildcard of '*' matches all characters upto the next given character.
  97.  
  98. NOTE: commands do not execute immediately, and may take a number of WimpPoll
  99.       events to complete. Subsequent commands are queued.
  100.  
  101. ==> Help on keyword WO_EnsureTask
  102. *WO_EnsureTask executes a *command if a task is not present.
  103. The task must have a bar icon or a window open to be recognised.
  104. Syntax: *WO_EnsureTask <taskname> <*command>
  105.  
  106. ==> Help on keyword WO_RemoveTask
  107. *WO_RemoveTask kills the named task, no error is given if it is not present.
  108. The task must have a bar icon or a window open to be recognised.
  109. Syntax: *WO_RemoveTask <taskname>
  110.  
  111. ==> Help on keyword WO_OpenWind
  112. *WO_OpenWind attempts to get a task to load a file. If the name of the window created is the same as the filename, the window can be moved to the position x0,y0 x1,y1 (see WO_MoveWind). No error is
  113. given if the task fails to load the file unless coords are supplied.
  114. Syntax: *WO_OpenWind <taskname> <full filename> [<x0> <y0> [<x1> <y1>] [-t|-b]]
  115.  
  116. ==> Help on keyword WO_MoveWind
  117. *WO_MoveWind moves a tasks window to a given postion. Supplying two coordinates will move the lower left corner of the window to x0,y0 leaving the size unchanged, an extra two coordinates will move
  118. the upper right hand corner to x1,y1 altering its size. -t or -b can be used to force the window to the top or bottom of the window stack.
  119. Prefix negatives with zero e.g. 0-100
  120. Syntax: *WO_MoveWind <taskname> <window name> <x0> <y0> [<x1> <y1>] [-t|-b]
  121.  
  122. ==> Help on keyword WO_CloseWind
  123. *WO_CloseWind closes the named window.
  124. Syntax: *WO_CloseWind <taskname> <window name>
  125.  
  126. ==> Help on keyword WO_MenuSelect
  127. *WO_MenuSelect delivers a menu selction to a tasks window. Sel1 to Sel10 are the numbers of selected menu entries in the main menu and submenus, the first item in a menu has number 1. Care should be
  128. taken not to select faded menu items.
  129. A window name of "IconBar" can be used for the tasks iconbar menu.
  130. Syntax: *WO_MenuSelect <taskname> <window name|IconBar> <Sel1> [<Sel2> [... <Sel10>]]
  131.  
  132. ==> Help on keyword WO_TypeString
  133. *WO_TypeString is equivelent to typing a string into a tasks window at the current caret position.
  134. Syntax: *WO_TypeString <taskname> <window name> <string>
  135.  
  136. ==> Help on keyword WO_ProcessKey
  137. *WO_ProcessKey delivers a key press event to a tasks window. <Key> can be in the range 0-255 for ASCII values, or greater than 256 for function keys and special WIMP actions.
  138. Syntax: *WO_ProcessKey <taskname> <window name> <Key>
  139.  
  140. ==> Help on keyword WO_IconBarClick
  141. *WO_IconBarClick is equivelent to clicking on a tasks bar icon.
  142. Syntax: *WO_IconBarClick <taskname>
  143.  
  144. ==> Help on keyword WO_WindowDump
  145. *WO_WindowDump writes the position of all currently active windows to the named file, in a format suitable to be OBEYed as a serise of WO_MoveWind commands.
  146. Syntax: *WO_WindowDump <filename>
  147.  
  148. ==> Help on keyword WO_WorkSpace
  149. IF the !WorkSpace application is present *WO_WorkSpace will change the current workspace. Workspaces are numbered 1 to 4.
  150. Syntax: *WO_WorkSpace <workspace>
  151.  
  152. ==> Help on keyword WO_WindWorks
  153. IF the !WorkSpace application is present *WO_WindWorks will change the workspaces a window occupies. The window will appear on the specified workspaces and will be reomoved from the others. -all
  154. means occupy all workspaces.
  155. Syntax: *WO_WindWorks <taskname> <window name> {[-1] [-2] [-3] [-4] [-5] [-6]} | -all
  156.  
  157. ==> Help on keyword WO_WorkSpaceModes
  158. IF the !WorkSpace application is present *WO_WorkSpaceModes will change the modes used by each workspace. Modes can be any valid desktop mode number, a new format sprite mode number, a mode specifier
  159. (pointing to a mode descriptor which MUST be in the RMA), or '0-1' to disable fixed mode operation for the workspace. Four or six mode numbers may be given depending on the version of !WorkSpace.
  160. Syntax: *WO_WorkSpaceModes <mode> <mode> <mode> <mode> [<mode> <mode>]
  161.